home *** CD-ROM | disk | FTP | other *** search
-
- In a msg of 12 Feb 96 Timothy Eves wrote to All:
-
- TE> Whilst looking through the Autodocs (OS v40) for the utility.library
- TE> I've come across several refernces to some software constructs called
- TE> Namespaces. What are they and what can the be used for?
-
- The namespace refers to the parts of a variable-name, used to make in
- unique within a program. The intention is to keep names as short as
- possible, without loosing the meaning. Things like routine-names etc. don't
- belong to variables and are a waist of 'namespace' (this waist is called
- 'namespace-polution'. For example
-
- Routine()
- {
- int Routine_var1, Routine_var2;
- etc...
- }
-
- The parts 'Routine_' are a wast of name-space. It's obvious they don't
- belong here and can be removed. But when you're using a lot of global
- variables (NOT recommended!), you will need these constructions. Try to
- avoid them! C++ is a language which highly reduces namespace-polution.
-
- In relation to the utility.library, I think the name-space relates to
- constant-names of tag-items. Usually the first two characters (followed by
- an underscore) are the 'namespace' to make the constant-names unique.
-
- I'm not sure if I cleared things up or if I only made it more confusing :)
-
- Greetings,
-
- _ _ _
- /_) /_) __// Hobby programmer... Fido: 2:280/464.2
- / atrick van /_)eem \X/ e-mail: patrick.van.beem@aobh.xs4all.nl
-
-